let g:custompath=expand('<sfile>:h') . "/"

let vimrc_base_path=g:custompath . 'basic.vim'
let plug_path=g:custompath . 'plug.vim'
let plugins1_path=g:custompath . '.vimrc.plugins'
let plugins2_path=g:custompath . '.vimrc.plugins.local'

let common_options_path=g:custompath . 'common_options.vim'
let common_mapping_config_path=g:custompath . 'platform/common.ini'
let os_platform_config_path=g:custompath . 'platform/os.ini'
let implement_config_path=g:custompath . 'platform/implement.ini'

exec ":set rtp +=" .expand('<sfile>:h')."/plugin"

" exec "source " . fnameescape(vimrc_base_path)
let mapleader='\'
exec "source " . fnameescape(plug_path)
call plug#begin('~/.vim/plugged')
exec "source ". fnameescape(plugins1_path)
exec "source " . fnameescape(plugins2_path)
call plug#end()

exec "source " . fnameescape(common_options_path)
call utils#mapping_config(common_mapping_config_path)
if 1 || has('gui_running')
    if platform#os()
        "   set platform name
        let g:platform='os'
        "   set font name
        set guifont=SauceCodeProNerdFontComplete-Regular:h18
        call utils#mapping_config(os_platform_config_path)
    else
    endif
endif
call utils#function_config(implement_config_path)

autocmd VimLeave * :call preview#exit()<cr>
